package ro.pub.cs.stadium.document.logic;

import java.util.ArrayList;

import ro.pub.cs.stadium.document.AbstractTransition;

public class Transition extends AbstractTransition {

	private Expression condition;
	
	public Transition(String name)	{
		setName(name);

		setAttribute("type", "transition");

	}
	
	public void setCondition(String cond) throws ExpressionException {
		condition = new Expression(cond);
		setAttribute("condition", condition.toString());
	}
	
	public Expression getCondition() {
		return condition;
	}

	
	public boolean isDefined() {
		return condition != null;
	}
}
